using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace Universe.Threading.Test
{
    [TestFixture]
    public class TestLock
    {
        private Lock Sync = new Lock();

        [Test]
        public void TestReader()
        {
            using (Sync.Reader)
            {
            }
        }

        [Test]
        public void TestWriter()
        {
            using (Sync.Writer)
            {
            }
        }

        [Test]
        public void TestWriterOnReading()
        {
            using (Sync.Reader)
            using (Sync.Writer)
            {
            }
        }

        [Test]
        public void TestReaderOnWriting()
        {
            using (Sync.Writer)
            using (Sync.Reader)
            {
            }
        }


    }
}
